package com.sunwayworld.common.utils;
import com.sun.mail.util.BASE64DecoderStream;
import com.sun.mail.util.BASE64EncoderStream;
public class Base64 {
	/**
     * 加密
     * @param str String
     * @return String
     */
    public static String encode(String str) {
        return new String(BASE64EncoderStream.encode(str.getBytes()));
    }

    /**
     * 解密
     * @param str String
     * @return String
     */
    public static String decode(String str) {
        return new String(BASE64DecoderStream.decode(str.getBytes()));
    }
}
